<%--
 *  File:    ActivityManageEdit.jsp
 *  @Author: only jin
 *  Date:    2009/10/22
 *
 *  Copyright (C) 2000 - 2001 Oval Technologies, Inc.
 *  All rights reserved. 
 *
 *  This software is the confidential and proprietary information of Oval 
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>


<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java"%>
<%@ page import="java.util.*"%>
<%@ page import="org.apache.log4j.Category"%>

<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/oval-tag.tld" prefix="oval"%>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom"%>
<%
	  //init param
  String privilegeCode = "SFE0150";
  String strTableName = "";
  String strModuleName = "CRM";
  	String contextPath = request.getContextPath();
%>

<iframe name="reloadHandler" style="display:none"></iframe>
<%//init param
			
			
			
			//params
		     String viewflag = "";

		     if(pageContext.getAttribute("viewflag") != null&&((String)pageContext.getAttribute("viewflag")).equals("view")) {

		           viewflag = "view";
		     }


		    String strIsDefault = null;
			String paraIsDefault = "";
			String isTdNeed = "td-text";
			if("Y".equals(request.getParameter("isdefault"))) {
				strIsDefault = "&isdefault=Y";
				paraIsDefault = "Y";
				isTdNeed = "need";
			}else if ("N".equals(request.getParameter("isdefault"))) {
				strIsDefault = "&isdefault=N";
				paraIsDefault = "N";
			}
		  String isNew = request.getParameter("isNew");
		  if("Y".equals(request.getParameter("isNew"))) {
				isNew = "Y";
			}else if ("N".equals(request.getParameter("isNew"))) {
				isNew = "N";
			}else  {
				isNew = null;
			}
	
		   
			
	
			
		  java.text.DateFormat format=new java.text.SimpleDateFormat("yyyy-MM-dd");

			String ss=format.format(new Date());
			
			HashMap userinfo = (HashMap)session.getAttribute("userinfo");

			String strFromuserid = (userinfo.get("userid")).toString();
			
			
			String optionvalue = null;

		  	if(pageContext.getAttribute("optionvalue") != null) {
		 		optionvalue=((Integer)pageContext.getAttribute("optionvalue")).toString();
		 	}else{
		 		optionvalue=(String)(request.getParameter("optionvalue"));
		 	}
		  	
		  	//optionvalue=(optionvalue==null)?"":("&optionvalue="+optionvalue);
		 	if(session.getAttribute("optionvalue")  != null) {
		 	
		 		optionvalue=((Integer)session.getAttribute("optionvalue")).toString();
		 	}
		 	
		 	
		
		     int i=0;
		     
		     i = Integer.parseInt(optionvalue);

		 	
		 	//活动影响结束时间
		 	Date influencedate=new Date();
		 	if(request.getParameter("influencedate")!=null && request.getParameter("influencedate").length()>0 ){
		 	  influencedate = format.parse(request.getParameter("influencedate").toString());
		 	}
		    //活动影响时间+i
		    Calendar newinfluence = Calendar.getInstance();
		 	
		    newinfluence.setTime(influencedate);

		    newinfluence.add(Calendar.DAY_OF_YEAR,i);//日期加i天


		 	
		 	Date newinfluencedate=newinfluence.getTime();
		    
		 	//活动准备开始时间

		 	Date readystartdate=new Date();
		 	if(request.getParameter("readystartdate")!=null  && request.getParameter("readystartdate").length()>0){
		 	 readystartdate = format.parse(request.getParameter("readystartdate").toString());
		 	}

		 	
		 	Calendar newreadystartdate = Calendar.getInstance();
		 	
		 	newreadystartdate.setTime(readystartdate);

		 	newreadystartdate.add(Calendar.DAY_OF_YEAR,i);//日期加i天

		 	
		 	Date newready=newreadystartdate.getTime();
		    
		    //System.out.println(newready);

		 	//活动开始时间	

		 	Date startdate=new Date();
		 	if(request.getParameter("startdate")!=null  && request.getParameter("startdate").length()>0){
		 	 startdate = format.parse(request.getParameter("startdate").toString());
		 	}
		 	
		 	Calendar newstartdate = Calendar.getInstance();
		 	
		 	newstartdate.setTime(startdate);

		 	newstartdate.add(Calendar.DAY_OF_YEAR,i);//日期加i天

		 	
		 	Date newstart=newstartdate.getTime();
		    


		 	//活动结束时间
		 	Date enddate=new Date();
		 	if(request.getParameter("enddate")!=null  && request.getParameter("enddate").length()>0){
		 	 enddate = format.parse(request.getParameter("enddate").toString());
		 	}
		 	
		 	Calendar newenddate = Calendar.getInstance();
		 	
		 	newenddate.setTime(enddate);

		 	newenddate.add(Calendar.DAY_OF_YEAR,i);//日期加i天

		 	
		 	Date newend=newenddate.getTime();
		    

		 	//系统时间

		    Date sysdate = format.parse(ss.toString());


			

%>
<%@ include file="/inc/FrmDefault.inc" %>
<%@ include file="/inc/Security.inc"%>
<%@ include file="/inc/PageDefault.inc"%>


<html>
<iframe name="summaryfrm" scrolling="no" frameborder="0"
	style="position:absolute; top:0px; left:0px; display:none;border:#909eff 1px solid;"></iframe>
<head>
<title>ActivityManageEdit</title>

<PageFlow:CheckPageFlow pageName="p_activitymanageedit" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet"
	href="<%=contextPath %>/css/<%= strLanguageCode %>/main.css"
	type="text/css">
<script language="JavaScript" src="<%=contextPath %>/js/FuncLib.js"></script>
<script language="JavaScript" src="<%=contextPath %>/js/Calendar.js"></script>
<script language="JavaScript" src="<%=contextPath %>/js/ScriptLib.js"></script>
<%@ include file ="/inc/NewCalendar.inc" %>
<script language="JavaScript">



function setcontactname(contantelement){

	var code = contantelement.value;
  	var  datahandler = new  DataHandler() ;
  	datahandler.add_params("contactcode" , code,"string") ;
  	datahandler.add_params("languagecode" , 'cn',"string") ;
  	
  	datahandler.getResultFromHashMap("contactinfo" ,"contactcode" ,"document.frm.contactcode");
  	datahandler.getResultFromHashMap("contactinfo" ,"contactname" ,"document.frm.contactname");
  	datahandler.getResultFromHashMap("contactinfo" ,"contactid" ,"document.frm.contactid");
  	
  	datahandler.add_job("j_distributortenderedit") ;
    datahandler.runDataHandler ();
}
function set_contactNameByPopWindow(id,name,code){
	
	document.frm.doctorcode.value=code;
	document.frm.doctorname.value=name;
	document.frm.contactid.value=id;

}

function sethospitalname(contantelement){

	var code = contantelement.value;
  	var  datahandler = new  DataHandler() ;
  	datahandler.add_params("orgcode" , code,"string") ;
  	datahandler.add_params("languagecode" , 'cn',"string") ;
  	
  	datahandler.getResultFromHashMap("hospitalinfo" ,"orgcode" ,"document.frm.orgcode");
  	datahandler.getResultFromHashMap("hospitalinfo" ,"orgname" ,"document.frm.orgname");
  	datahandler.getResultFromHashMap("hospitalinfo" ,"orgid" ,"document.frm.orgid");
  	
  	datahandler.add_job("j_distributortenderedit") ;
    datahandler.runDataHandler ();
}

function set_orgNameByPopWindow(id,name,code){
	
	document.frm.orgcode.value=code;
	document.frm.orgname.value=name;
	document.frm.businessorgid.value=id;

}

function page_popwindow(){
  	if(popwindow!=null)
    	popwindow.close();
  	var strurl="<%=contextPath%>/masterdata/ogm/BusiAreaTreePop.jsp?<%= OvalTools.randomURL()%>&languagecode=<%=strLanguageCode%>"; 
  	var strStatus= "height=400,width=260,top=100,left=100,toolbar=n0, menubar=no, scrollbars=no, resizable=no, location=no, status=no";
 	popwindow=window.open(strurl, "newwindow",strStatus);
}

function page_setBusinessArea(id,areaname,parentid){
  	frm.areaid.value=id;
  	frm.areaname.value=areaname;
}

function popWindowShowContactPage(){
	var url = "<%=contextPath%>/masterdata/ogm/popWindowContactInfo.jsp?"+"<%= OvalTools.randomURL() %>"+"&orgid=1&languagecode=<%=strLanguageCode%>";
	var windowAttribute = "height=400, width=800,top=100,left=100, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=yes";
	if(popwindow!=null)
    popwindow.close();
  	popwindow = window.open(url,'ContactInfo',windowAttribute);
}

function popWindowShowHospitalPage(){
	var url = "<%=contextPath%>/masterdata/ogm/OrgPopWindow.jsp?"+"threadxcnt=0.06165288538971159"+"&globalpccode=100&orgid=1&languagecode=cn";
	var windowAttribute = "height=400, width=600,top=100,left=100, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=yes";
  	if(popwindow!=null)
    popwindow.close();
  	popwindow = window.open(url,'hospitalinfo',windowAttribute);
}



function page_return(){
	//self.location.href='DistributortenderSummary.jsp?<%= OvalTools.randomURL() %>';
	parent.location.href = "ActivityManageSummary.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode%><%=JspHelper.filterNull( strIsDefault )%>";
}
	
function page_done()
{
  if(!checkForm(frm)) return; 	
	emptyToNull(frm);

	var startdate=document.frm.startdate.value;
	var enddate=document.frm.enddate.value;	
	var readystartdate=document.frm.readystartdate.value;
	var influencedate=document.frm.influencedate.value;
	var ss=document.frm.ss.value;
	var status=document.frm.status.value;
	if(ss>readystartdate)
	{
		alert("系统时间不能大于准备开始时间");
		return;
	}	
	if(readystartdate>startdate)
	{
		alert("开始时间不能小于准备开始时间");
		return;
	}
	if(startdate>enddate)
	{
		alert("结束时间不能小于开始时间");
		return;
	}
	if(enddate>influencedate)
	{
		alert("影响结束时间不能小于结束时间");
		return;
	}

	//if(status!=10)
	//{
		//alert("只有输入状态才能保存");
		//return;
	//}		
	
  document.frm.actionname.value="save";
  document.frm.target="_parent";
  isRunning = true;
  document.frm.submit();
}	


function page_AreaAllWindow(){
	  var url = "<%=contextPath%>/zyl/masterdata/map/SelectAreaTree.jsp?"+"<%= OvalTools.randomURL() %>";
	  var windowAttribute = "height=400, width=600,top=100,left=100, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=yes";
	  if(popwindow!=null) popwindow.close();
	  popwindow = window.open(url,null,windowAttribute);
}

function setAreas(areaids,areanames,areacodes){
	document.frm.areaid.value = areaids;
	document.frm.areaname.value = areanames;
} 


function page_setProduct111(id,code,name,price,spec){	
	if(switchtype==3){
		frm.serproductid.value=id;
		frm.serproductcode.value=code;
		frm.serproductname.value=name;
	}else if(switchtype==6){
		frm.prodid.value=id;
		frm.prodcode.value=code;
		frm.prodname.value=name;
	}
	hiddenFrm();
}

var isHidden;
function frm_select(e,flag){
	switchtype=flag;
	isHidden = "block";
	var _target = getPosition(e);
    var _obj = document.getElementById("summaryfrm");
    _obj.style.left = _target.x;
    _obj.style.top = _target.y + e.clientHeight;
    _obj.style.height="250px";
    _obj.style.width="530px";
    _obj.style.zIndex = 5000;
    _obj.style.display = "block";
	var strUrl = "";	
	if(flag==1 || flag==4){
		strUrl = "<%=contextPath %>/tdr/datatypein/OrgSelectPop.jsp?maxitem=8&globalpccode=1&<%= OvalTools.randomURL() %>";
	}else if(flag==2 || flag==5){
		if(flag==5)_obj.style.left = _target.x-530;
		strUrl = "<%=contextPath %>/tdr/datatypein/OrgSelectPop.jsp?maxitem=8&globalpccode=2&<%= OvalTools.randomURL() %>";
	}else if(flag==3 || flag==6){
		_obj.style.height="300px";
		strUrl = "<%=contextPath %>/tdr/datatypein/ProdSelectPop.jsp?maxitem=10&<%= OvalTools.randomURL() %>";
	}
    document.summaryfrm.location.href = strUrl;
}
function getPosition(e) {
        var left = 0;
        var top = 0;
        while (e.offsetParent) {
            left += e.offsetLeft + (e.curentStyle? (parseInt(e.curentStyle.borderLeftWidth).NaN0()):0);
            top += e.offsetTop + (e.curentStyle ? (parseInt(e.curentStyle.borderTopWidth)).NaN0() : 0);
            e = e.offsetParent;
        }
        left += e.offsetLeft + (e.curentStyle ? (parseInt(e.curentStyle.borderLeftWidth)).NaN0() : 0);
        top += e.offsetTop + (e.curentStyle ? (parseInt(e.curentStyle.borderTopWidth)).NaN0() : 0);
        return {x:left, y:top};
}

function hiddenFrm(){
	document.getElementById("summaryfrm").style.display = "none";
}

function page_summary(actionvalue,orderbyname)
{
  var editform = summaryPrepare(frm,actionvalue,orderbyname);
  if(!editform) return;
  editform.action = "ActivityManageEdit.jsp?<%= OvalTools.randomURL() %>";
  editform.target = "_parent";
  isRunning = true;
  editform.submit();
}

function page_popUserwindow(blue)
{
  if (typeof popwindow != 'undefined') popwindow.close();
  popwindow = window.open("<%=contextPath%>/sfe/activity/EmployeeBussiseForPopInfo.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>","newwindow", "height=300, width=800,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no");
	
}

function setSalesMan(userid,username,station){
	document.frm.userid.value=userid;
	document.frm.username.value=username;
	
}

function page_selectCity(flag,grade)
{
  var regioncode = document.frm.regioncode.value;
  var parentcitycode = document.frm.citycode.value;
  if(flag=="city")parentcitycode='null';
  if(regioncode=="" || regioncode==-1){
    alert("<%= message.getMessageDesc("MUST_SELECT_FIRST",label.getLabelName("L_Province"))%>");
    return;
  }
  if(parentcitycode=="" || parentcitycode==-1){
    alert("<%= message.getMessageDesc("MUST_SELECT_FIRST",label.getLabelName("L_City"))%>");
    return;
  }
  var url='<%=contextPath %>/masterdata/ogm/CitySelect.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>&countrycode=CN&regioncode=' + regioncode + '&flag=' + flag+'&grade='+grade;
  if(flag=="county"){
   url=url+'&parentcitycode='+parentcitycode;
  }
  if(popwindow!=null)
    popwindow.close();
  popwindow = window.open(url,'newwindow', 'height=250, width=400,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no');
}

function page_setCity(code,name,id,flag)
{
	if(flag == "county"){
		document.frm.countycode.value = code;
		document.frm.countyname.value = name;
		document.frm.countyid.value = id;
	}else {
		document.frm.citycode.value = code;
		document.frm.cityname.value = name;
		document.frm.cityid.value = id;
		document.frm.countycode.value = "";
    	document.frm.countyname.value = "";
    	document.frm.countyid.value = "";    	
	}
  if (popwindow != null)
    popwindow.close();
}


var popwindow;
function page_selectProvince()
{

  if(popwindow!=null)
    popwindow.close();
  popwindow = window.open('<%=contextPath %>/masterdata/ogm/RegionSelect.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>&countrycode=CN','newwindow', 'height=250, width=500,top=100,left=100,toolbar=n0, menubar=no, scrollbars=no, resizable=no, location=no, status=no');
}

function page_setRegion(code,name,id)
{
  if(code != document.frm.regioncode.value)
  {
    document.frm.citycode.value = "";
    document.frm.cityname.value = "";
    document.frm.cityid.value = "";
	document.frm.countycode.value = "";
    document.frm.countyname.value = "";
    document.frm.countyid.value = "";
  }
  document.frm.regioncode.value = code;
  document.frm.regionname.value = name;
  document.frm.regionid.value = id;
  if (popwindow != null)
    popwindow.close();
}

function popbuyerorg()
{  	
    window.open("../../sfe/activity/ActivityManageOrgSelect.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>", "newwindow", "height=250, width=600,top=100,left=100,toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no");
}

function setSalesMan1(id,name,code){
    frm.shortorgid.value = id;
    frm.shortorgname.value = code;
    frm.shortorgcode.value = name;
}

function popdoctor()
{  	
    window.open("../../sfe/activity/ActivityManageDoctorPop.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>", "newwindow", "height=250, width=800,top=100,left=100,toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no");
}

function setLinkMan(id,name){
    frm.doctorid.value = id;
    frm.doctorname.value = name;
}

function popSelectProductWindow(){
	var url = "<%=contextPath%>/devlop/distributortender/ProdPopWindow.jsp?"+"threadxcnt=0.06165288538971159"+"&orgid=1&languagecode=cn";
	var windowAttribute = "height=250, width=400,top=100,left=100, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=yes";
  	if(popwindow!=null)
    popwindow.close();
  	popwindow = window.open(url,'hospitalinfo',windowAttribute);
}

function page_setProduct(id,code,name){
	frm.prodnames.value=name;
	frm.prodids.value=id;
}


//活动产品编辑
function popProductWindow(){
	var id=document.frm.activitymanageid.value;
	var url = "<%=contextPath%>/sfe/activity/ActivityManageProdSummary.jsp?"+"threadxcnt=0.06165288538971159"+"&orgid=1&languagecode=cn&activitymanageid="+id;
	var windowAttribute = "height=400, width=1200,top=100,left=50, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=yes";
  	if(popwindow!=null)
    popwindow.close();
  	popwindow = window.open(url,'hospitalinfo',windowAttribute);
}

//活动产品查看
function popProductWindowinfo(){
	var id=document.frm.activitymanageid.value;
	var url = "<%=contextPath%>/sfe/activity/ActivityManageProdInfo.jsp?"+"threadxcnt=0.06165288538971159"+"&orgid=1&languagecode=cn&activitymanageid="+id;
	var windowAttribute = "height=400, width=1200,top=100,left=100, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=yes";
  	if(popwindow!=null)
    popwindow.close();
  	popwindow = window.open(url,'hospitalinfo',windowAttribute);
}

//活动应邀机构编辑
function popwindoworg()
{  	
	var id=document.frm.activitymanageid.value;
	var userids=document.frm.userids.value;
	var userid1=document.frm.userid1.value;
    window.open("../../sfe/activity/ActivityManageOrgSummary.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>&activitymanageid="+id+"&userids="+userids+"&userid1="+userid1, "newwindow", "height=500, width=1000,top=100,left=100,toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no");
}

//活动应邀机构查看
function popwindoworginfo()
{  	
	var id=document.frm.activitymanageid.value;
	var userids=document.frm.userids.value;
	var userid1=document.frm.userid1.value;
    window.open("../../sfe/activity/ActivityManageOrgInfo.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>&activitymanageid="+id+"&userids="+userids+"&userid1="+userid1, "newwindow", "height=500, width=1000,top=100,left=100,toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no");
}

//活动应邀客户编辑
function popwindowdoctor()
{  	
	var userids=document.frm.userids.value; 
	var id=document.frm.activitymanageid.value;
    window.open("../../sfe/activity/ActivityManageDoctorSummary.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>&activitymanageid="+id+"&userids="+userids, "newwindow", "height=500, width=1000,top=100,left=100,toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no");
}

//活动应邀客户查看
function popwindowdoctorinfo()
{  	
	var userids=document.frm.userids.value; 
	var id=document.frm.activitymanageid.value;
    window.open("../../sfe/activity/ActivityManageDoctorInfo.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>&activitymanageid="+id+"&userids="+userids, "newwindow", "height=500, width=1000,top=100,left=100,toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no");
}

//会议时间
function popwindowmeet()
{  	
	var userids=document.frm.userids.value; 
	var id=document.frm.activitymanageid.value;
    window.open("../../sfe/activity/AgreementMeetDetail.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>&activitymanageid="+id+"&userids="+userids, "newwindow", "height=500, width=1000,top=100,left=100,toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no");
}

//会议时间查看
function ppopwindowmeetinfo()
{  	
	var userids=document.frm.userids.value; 
	var id=document.frm.activitymanageid.value;
    window.open("../../sfe/activity/AgreementMeetDetail.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>&activitymanageid="+id+"&userids="+userids+"&viewflag=view", "newwindow", "height=500, width=1000,top=100,left=100,toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no");
}
//活动参与人编辑
function popwindowuser()
{  	
	var id=document.frm.activitymanageid.value;
	var userid=document.frm.userid1.value;

	
	
    window.open("../../sfe/activity/ActivityManageUserSummary.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>&startdate=<%=JspHelper.filterNull(pageContext.getAttribute("startdate"))%>&enddate=<%=JspHelper.filterNull(pageContext.getAttribute("enddate"))%>&readystartdate=<%=JspHelper.filterNull(pageContext.getAttribute("readystartdate"))%>&influencedate=<%=JspHelper.filterNull(pageContext.getAttribute("influencedate"))%>&optionvalue=<%=JspHelper.filterNull(optionvalue)%>&activitymanageid="+id+"&employeeid="+userid, "newwindow", "height=300, width=800,top=100,left=100,toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no");
}

//活动参与人查看
function popwindowuserinfo()
{  	
	var id=document.frm.activitymanageid.value;
	var userid=document.frm.userid1.value;
    window.open("../../sfe/activity/ActivityManageUserInfo.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>&activitymanageid="+id+"&employeeid="+userid, "newwindow", "height=300, width=800,top=100,left=100,toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no");
}

function page_submit()
{
	//if(!checkForm(frm))   return;

   //if ( ! confirm("<%= message.getMessageDesc("ARE_YOU_SURE") %>") )  return;
	//var frm = document.frm;
	
	

	document.frm.actionname.value = "submit";
	document.frm.target = "_parent";
	document.frm.submit();
}


function page_donesub(a_str){ 
	
 var approvalnoteseditform=document.frm;
 if(a_str=="agree")
    {
      if (isAllSpace(approvalnoteseditform.nt0.value)){
     
        approvalnoteseditform.nt0.value = "<%= label.getLabelName("L_Agree",false)%>";
      }else{
        approvalnoteseditform.nt0.value = "<%= label.getLabelName("L_Agree",false) + label.getLabelName("L_Colon")%>"+approvalnoteseditform.nt0.value;
      }
    	approvalnoteseditform.actionname.value = "approvepassed";
    }else if(a_str=="deny"){
   
      if (isAllSpace(approvalnoteseditform.nt0.value)){
        approvalnoteseditform.nt0.value = "<%= label.getLabelName("L_Refuse",false)%>";
      }else{
        approvalnoteseditform.nt0.value = "<%= label.getLabelName("L_Refuse",false) + label.getLabelName("L_Colon")%>"+approvalnoteseditform.nt0.value;
      }
        approvalnoteseditform.actionname.value = "approvedenied";
    }
    else if(a_str=="disagree"){
   
      if (isAllSpace(approvalnoteseditform.nt0.value)){
        approvalnoteseditform.nt0.value = "<%= label.getLabelName("L_NotAgree",false)%>";
      }else{
        approvalnoteseditform.nt0.value = "<%= label.getLabelName("L_NotAgree",false) + label.getLabelName("L_Colon")%>"+approvalnoteseditform.nt0.value;
      }
        approvalnoteseditform.actionname.value = "approvepassed";
        
    }
   
    setValue();
   
    approvalnoteseditform.pagename.value="approvalnotesedit";
    approvalnoteseditform.target = "_parent";
    isRunning = true;
    approvalnoteseditform.submit();
}
    
    function setValue()
{
   //var frm = document.usergroupsummaryform;
   frm.nt1.value = frm.nt0.value;
   frm.nc1.value = frm.nc0.value;
}


function page_approval(){
      frm.actionname.value = "approve";
      frm.target = "_parent";
      isRunning = true;
      frm.submit();
}

function page_approvalInfo(){

	var id=document.frm.transactionid.value;
	var code=document.frm.transactioncode.value; 
	var subjectcode=document.frm.subjectcode.value;
    window.open("../../biee/ApprovalNotesFrm.jsp?<%= OvalTools.randomURL() %>&transactionid="+id+"&subjectcode="+subjectcode+"&transactioncode="+code, "newwindow", "height=500, width=1000,top=100,left=100,toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no");
}


</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" cellspacing="0" cellpadding="0">
	<tr>
		<td class="summary_top"></td>
	</tr>
</table>
<table width="100%" cellspacing="0" cellpadding="0">
	<form name="frm" method="post" action="../../Dispatcher" target="_parent"><input
		type="hidden" name="pagename" value="p_activitymanageedit"> <input
		type="hidden" name="actionname">
	<custom:hidden property="orgid" name="userinfo" scope="session"/>
	<!-- 
	<custom:hidden property="userid" changedName="maker" name="userinfo" scope="session"/>
	 -->
	 
	<custom:hidden property="activitymanageid" name="visitprocessinfo"/>
	<input type="hidden" name="transactioncode"  value="<custom:write name="visitprocessinfo" property="activitymanagecode"/>" />
	<input type="hidden" name="transactionid"  value="<custom:write name="visitprocessinfo" property="activitymanageid"/>" />
	<input type="hidden" name="subjectcode" value="814">
	 <input type="hidden" name="isNew" value="<%= isNew %>">
	 
	 <input type="hidden" name="userids" value="<%= pageContext.getAttribute("userids") %>">
	 
	  <input type="hidden" name="count" value="<%= pageContext.getAttribute("count") %>">
	  
	  <input type="hidden" name="optionvalue" value="<%= optionvalue %>">
	 
	 <input type="hidden" name="ss" value="<%= ss %>">

	
	 <custom:hidden property="parentuserid" name="visitprocessinfo" />
	     <input type="hidden" name="nt0">
      <input type="hidden" name="nt1">
        <input type="hidden" name="nc1">
          <input type="hidden" name="nc0">
	<tr>
		<td valign="top">
		<table border="1" cellspacing="0" bordercolorlight="#999999"
			bordercolordark="#FFFFFF" align="center" width="100%" cellpadding="1">
			<span id="editbody">
			<tr>
				<td colspan="4" class="deepblue-left"><img
					src="../../images/<%= strLanguageCode %>/quote.gif">
			</tr>
			<%boolean isAuto = pageContext.getAttribute("isauto") != null
					&& pageContext.getAttribute("isauto").toString()
							.equalsIgnoreCase("Y");
			String codeClass = isAuto ? "td-text" : "need";
			String codeIsNull = isAuto ? "Y" : "N";
			String codeISDisabled = isAuto ? "true" : "false";

			%>
			<%
				 HashMap visitprocessinfo = (HashMap)pageContext.getAttribute("visitprocessinfo");
				 if(visitprocessinfo == null)
				  {
					 visitprocessinfo = new HashMap();
				  }
				 
				  Vector users = (Vector)pageContext.getAttribute("users");
				  if(users == null)
				  {
					  users = new Vector();
				  }
				  
				  HashMap needrspinfo = (HashMap)pageContext.getAttribute("needrspinfo");
				  if(needrspinfo == null)
				  {
					  needrspinfo = new HashMap();
				  }
			%>
			


<%if(visitprocessinfo.get("status")!=null && ((Integer)visitprocessinfo.get("status")).intValue() == 40){%>
			<!-- --------------------------Row No: 1-------------------------------------- -->
			<tr>
				<td class="need" width="20%" ><%=label.getLabelName("L_Activity")+label.getLabelName("L_Code") + label.getLabelName("L_Colon")%></td>
				<td width="30%" >
					<custom:write name="visitprocessinfo" property="activitymanagecode"/>&nbsp;
				</td>
				<td class="need" width="20%"><%=label.getLabelName("L_Activity")+label.getLabelName("L_ItemName1") + label.getLabelName("L_Colon")%></td>
				<td width="30%">
					<custom:write name="visitprocessinfo" property="activitymanagename"/>&nbsp;
				</td>
			</tr>
			
			
			
			
			
			<!-- 重点项目 活动种类 -->
			<tr>
				<td class="td-text"><%=label.getLabelName("L_majorproject") + label.getLabelName("L_Colon")%></td>
				<td>
					<custom:write name="visitprocessinfo" property="majorprojectname"/>&nbsp;
				</td>
				<td class="td-text"><%=label.getLabelName("L_Activity")+label.getLabelName("L_Kind") + label.getLabelName("L_Colon")%></td>
				<td>
					<custom:write name="visitprocessinfo" property="activitytypename"/>&nbsp;
				</td>
			</tr>
			
			<!-- --------------------------Row No: 2-------------------------------------- -->
			<tr>
				<td class="need"><%=label.getLabelName("L_Activity")+label.getLabelName("L_Way")+ label.getLabelName("L_Colon")%></td>
				<td>
					<custom:write name="visitprocessinfo" property="activityconfigname" />&nbsp;
				</td>
				
				<td class="need"><%= label.getLabelName("L_Status") + label.getLabelName("L_Colon") %></td>
	          	<td><custom:write name="visitprocessinfo" property="statusname" />
	          	<custom:hidden  name="visitprocessinfo" property="status" /></td>
	           	<!-- 
					<td class="need"><%=label.getLabelName("L_Prodname")+ label.getLabelName("L_Colon")%></td>
					<td><custom:text name="visitprocessinfo" property="prodname"  readonly="true"/>
						<a onclick="javascript:popSelectProductWindow();">
						<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
					</td>           	
	           	 -->				
            	
			</tr>			
			<!-- --------------------------Row No: 3-------------------------------------- -->


			<!-- --------------------------Row No: 4-------------------------------------- -->
			<tr>

				<td  class="need"><%= label.getLabelName("L_Activity")+label.getLabelName("L_Ready")+label.getLabelName("L_Start")+label.getLabelName("L_Time") + label.getLabelName("L_Colon") %></td>
	            <td>
	            	<custom:write property="readystartdate"  name="visitprocessinfo" dataType="date" />&nbsp;
	            </td>
				<td  class="need" ><%= label.getLabelName("L_Activity")+label.getLabelName("L_Start")+label.getLabelName("L_Time") + label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:write property="startdate" name="visitprocessinfo" dataType="date" />&nbsp;
	            </td>	            				
			</tr>

			<!-- --------------------------Row No: 5-------------------------------------- -->
			<tr>

				<td  class="need"><%= label.getLabelName("L_Activity")+label.getLabelName("L_Affect")+label.getLabelName("L_EndTime")+ label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:write property="influencedate" name="visitprocessinfo" dataType="date" />&nbsp;
	            </td>
				<td  class="need"><%= label.getLabelName("L_Activity")+label.getLabelName("L_EndTime")+ label.getLabelName("L_Colon") %></td>
	            <td>
	            	<custom:write property="enddate" name="visitprocessinfo" dataType="date" />&nbsp;
	            </td>	            	            				
			</tr>

			<!-- --------------------------Row No: 6-------------------------------------- -->
			<tr>
				<td  class="need"><%= label.getLabelName("L_Maker") + label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:write property="makername"   name="visitprocessinfo" nbsp="true"/>
	               <custom:write property="employeename"   name="visitprocessinfo" nbsp="true"/>
	               <custom:hidden property="userid1"   name="visitprocessinfo" />
	            </td>
				<td  class="need"  ><%= label.getLabelName("L_CreateTime")+ label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:write property="createdate"  dataType="date"  name="visitprocessinfo" nbsp="true"/>
	            </td>	            				
			</tr>
			<!-- --------------------------Row No: 7-------------------------------------- -->
			<tr>			
			<td class="need"><%= label.getLabelName("L_Province") + label.getLabelName("L_Colon") %></td>
			<td>
				   <custom:write property="regionname" name="visitprocessinfo"  />&nbsp;
			</td>		
          	<td class="need"><%= label.getLabelName("L_City") + label.getLabelName("L_Colon") %></td>
          	<td>
				<custom:write property="cityname" name="visitprocessinfo" />&nbsp;
            </td>
			</tr>			
			<!-- --------------------------Row No: 8-------------------------------------- -->			
			<tr>
            <td class="need"><%= label.getLabelName("L_YLCounty") + label.getLabelName("L_Colon") %></td>
            <td colspan="3">
				<custom:write property="countyname"  name="visitprocessinfo"  />&nbsp;
            </td>
           	</tr>  
			<!-- --------------------------Row No: 9-------------------------------------- -->					
			<tr>
            
					<td class="need"><%=label.getLabelName("L_Activity")+ label.getLabelName("L_ActivityParter")+ label.getLabelName("L_Colon")%></td>
					<%
					if(visitprocessinfo.get("activitymanageid")!=null){
					%>
					<td>
					    <a onclick="javascript:popwindowuser();">
						<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
	                </td>
	                <%}else{ %>
					<td>
					    <a onclick="alert('<%= message.getMessageDesc("SAVE_INFO_FIRST") %>');">
						<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
	                </td>                
	                <%} %>           		
	         		<!-- 
	         		<td>
						<custom:hidden  name="visitprocessinfo" property="userid" />
			           	<custom:text name="visitprocessinfo" property="username" size="20" command="notnull" label="L_ActivityParter"/>
	              		<a onclick="page_popUserwindow();"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
	         		</td>
	         		 --> 


				<td class="need"  ><%=label.getLabelName("L_Activity")+label.getLabelName("L_Products")+ label.getLabelName("L_Colon")%></td>

				<%
				if(visitprocessinfo.get("activitymanageid")!=null){
				%>
				<td>
				    <a onclick="javascript:popProductWindow();">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>
                <%}else{ %>
				<td>
				    <a onclick="alert('<%= message.getMessageDesc("SAVE_INFO_FIRST") %>');">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>                
                <%} %>					
				<!-- 
				<td><custom:text property="prodnames" command="notnull" label="L_Products"/>
					<a onclick="javascript:popSelectProductWindow();">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
					<custom:text property="prodids" />
				</td>
				<td><custom:text name="visitprocessinfo" property="prodname"  readonly="true" command="notnull" label="L_Products"/>
					<a onclick="javascript:popSelectProductWindow();">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
				</td>
				 -->	         		           	 
           	</tr>

<!-- --------------------------Row No: 10-------------------------------------- -->	
			<tr>
            <td class="need"  ><%= label.getLabelName("L_Mactivity")+label.getLabelName("L_Invitation")+label.getLabelName("L_org")+ label.getLabelName("L_Colon") %></td>
				<%
				if(visitprocessinfo.get("activitymanageid")!=null){
				%>
				<td>
				    <a onclick="javascript:popwindoworg();">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>
                <%}else{ %>
				<td>
				    <a onclick="alert('<%= message.getMessageDesc("SAVE_INFO_FIRST") %>');">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>                
                <%} %>            
            <!-- 
            <td>
                	<custom:text name="visitprocessinfo" property="shortorgname" command="notnull" label="L_org" />
                    <a onclick="popbuyerorg()"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
                    <custom:hidden name="visitprocessinfo" property="shortorgid" />
                    <custom:hidden name="visitprocessinfo" property="shortorgcode" />
            </td>
             -->
             
            <td class="need"  ><%= label.getLabelName("L_Mactivity")+label.getLabelName("L_Invitation")+label.getLabelName("L_Customer")+ label.getLabelName("L_Colon") %></td>
				<%
				if(visitprocessinfo.get("activitymanageid")!=null){
				%>
				<td>
				    <a onclick="javascript:popwindowdoctor();">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>
                <%}else{ %>
				<td>
				    <a onclick="alert('<%= message.getMessageDesc("SAVE_INFO_FIRST") %>');">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>                
                <%} %>  
            <!-- 
            <td>
                	<custom:text name="visitprocessinfo" property="doctorname" command="notnull" label="L_Customer"/>
                    <a onclick="popdoctor()"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
                    <custom:hidden name="visitprocessinfo" property="doctorid"  />
            </td>            
             -->
			</tr>   
			<tr>
            <td class="need"  ><%= label.getLabelName("L_MeetingTime")+ label.getLabelName("L_Colon") %></td>
            <%if(visitprocessinfo.get("activitymanageid")!=null){%>
			<td colspan="3"><a onclick="javascript:popwindowmeet();"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /></a></td>
            <%}else{ %>
			<td colspan="3"><a onclick="alert('<%= message.getMessageDesc("SAVE_INFO_FIRST") %>');"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a></td>                
            <%} %>   
           </tr>                	            	          						
			<!-- --------------------------Row No: 11-------------------------------------- -->


            <!-- 
			<tr>
				<td  class="td-text"><%= label.getLabelName("L_ Account_CustomerNumber") + label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:write property="accountcustomernumber"   name="visitprocessinfo" />&nbsp;
	               
				<td  class="td-text"  ><%= label.getLabelName("L_ develop_CustomerNumber")+ label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:write property="developcustomernumber"   name="visitprocessinfo"  />&nbsp;
	            </td>	            				
			</tr>
			
			<tr>
				<td  class="td-text"><%= label.getLabelName("L_ Commercialsalestarget") + label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:write property="commercialsalestarget"   name="visitprocessinfo"  />&nbsp;
	              
	            </td>
				<td  class="td-text"  ><%= label.getLabelName("L_ Netsalestarget")+ label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:write property="netsalestarget"  dataType="date"  name="visitprocessinfo"  />&nbsp;
	            </td>	            				
			</tr>
			
			<tr>
				<td  class="td-text"><%= label.getLabelName("L_ Commercialpurchasetarget") + label.getLabelName("L_Colon") %></td>
	            <td colspan="3">
	               <custom:write property="commercialpurchasetarget"   name="visitprocessinfo"  />&nbsp;
	              
            				
			</tr>
			 -->		
			<tr>
				<td class="td-text"><%=label.getLabelName("L_Instance") + label.getLabelName("L_Colon")%></td>
				<td colspan="3">
					<custom:write name="visitprocessinfo" property="comments" />&nbsp;
				</td>
			</tr>
			
<%}else if(visitprocessinfo.get("status")!=null && ((Integer)visitprocessinfo.get("status")).intValue() == 20){%>
			
			<!-- --------------------------Row No: 1-------------------------------------- -->
			<tr>
				<td class="need" width="20%"><%=label.getLabelName("L_Activity")+label.getLabelName("L_Code") + label.getLabelName("L_Colon")%></td>
				<td width="30%">
					<custom:write name="visitprocessinfo" property="activitymanagecode"/>&nbsp;
				</td>
				<td class="need" width="20%"><%=label.getLabelName("L_Activity")+label.getLabelName("L_ItemName1") + label.getLabelName("L_Colon")%></td>
				<td width="30%">
					<custom:write name="visitprocessinfo" property="activitymanagename"/>&nbsp;
				</td>
			</tr>
			
			
			
			
			<!-- 重点项目 活动种类 -->
			<tr>
				<td class="need"><%=label.getLabelName("L_majorproject") + label.getLabelName("L_Colon")%></td>
				<td>
					<custom:write name="visitprocessinfo" property="majorprojectname"/>&nbsp;
				</td>
				<td class="need"><%=label.getLabelName("L_Activity") +label.getLabelName("L_Kind")+ label.getLabelName("L_Colon")%></td>
				<td>
					<custom:write name="visitprocessinfo" property="activitytypename"/>&nbsp;
				</td>
			</tr>
			
			<!-- --------------------------Row No: 2-------------------------------------- -->
			<tr>
				<td class="need"><%=label.getLabelName("L_Activity")+label.getLabelName("L_Way")+ label.getLabelName("L_Colon")%></td>
				<td>
					<custom:write name="visitprocessinfo" property="activityconfigname" />&nbsp;
				</td>
				
				<td class="need"><%= label.getLabelName("L_Status") + label.getLabelName("L_Colon") %></td>
	          		<td>
	          	<custom:write name="visitprocessinfo" property="statusname" />
	          	<custom:hidden  name="visitprocessinfo" property="status" />	
	           	   	</td>
	           	<!-- 
					<td class="need"><%=label.getLabelName("L_Prodname")+ label.getLabelName("L_Colon")%></td>
					<td><custom:text name="visitprocessinfo" property="prodname"  readonly="true"/>
						<a onclick="javascript:popSelectProductWindow();">
						<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
					</td>           	
	           	 -->				
            	
			</tr>			
			<!-- --------------------------Row No: 3-------------------------------------- -->


			<!-- --------------------------Row No: 4-------------------------------------- -->
			<tr>

				<td  class="need"><%= label.getLabelName("L_Activity")+label.getLabelName("L_Ready")+label.getLabelName("L_Start")+label.getLabelName("L_Time") + label.getLabelName("L_Colon") %></td>
	            <td>
	            	<custom:write property="readystartdate"  name="visitprocessinfo" dataType="date" />&nbsp;
	            </td>
				<td  class="need" ><%= label.getLabelName("L_Activity")+label.getLabelName("L_Start")+label.getLabelName("L_Time") + label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:write property="startdate" name="visitprocessinfo" dataType="date" />&nbsp;
	            </td>	            				
			</tr>

			<!-- --------------------------Row No: 5-------------------------------------- -->
			<tr>

				<td  class="need"><%= label.getLabelName("L_Activity")+label.getLabelName("L_Affect")+label.getLabelName("L_EndTime")+ label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:write property="influencedate" name="visitprocessinfo" dataType="date" />&nbsp;
	            </td>
				<td  class="need"><%= label.getLabelName("L_Activity")+label.getLabelName("L_EndTime")+ label.getLabelName("L_Colon") %></td>
	            <td>
	            	<custom:write property="enddate" name="visitprocessinfo" dataType="date" />&nbsp;
	            </td>	            	            				
			</tr>

			<!-- --------------------------Row No: 6-------------------------------------- -->
			<tr>
				<td  class="need"><%= label.getLabelName("L_Maker") + label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:write property="makername"   name="visitprocessinfo" nbsp="true"/>
	               <custom:write property="employeename"   name="visitprocessinfo" nbsp="true"/>
	               <custom:hidden property="userid1"   name="visitprocessinfo" />
	            </td>
				<td  class="need"  ><%= label.getLabelName("L_CreateTime")+ label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:write property="createdate"  dataType="date"  name="visitprocessinfo" nbsp="true"/>
	            </td>	            				
			</tr>
			<!-- --------------------------Row No: 7-------------------------------------- -->
			<tr>			
			<td class="need"><%= label.getLabelName("L_Province") + label.getLabelName("L_Colon") %></td>
			<td>
				   <custom:write property="regionname" name="visitprocessinfo"  />&nbsp;
			</td>		
          	<td class="need"><%= label.getLabelName("L_City") + label.getLabelName("L_Colon") %></td>
          	<td>
				<custom:write property="cityname" name="visitprocessinfo" />&nbsp;
            </td>
			</tr>			
			<!-- --------------------------Row No: 8-------------------------------------- -->			
			<tr>
            <td class="need"><%= label.getLabelName("L_YLCounty") + label.getLabelName("L_Colon") %></td>
            <td colspan="3">
				<custom:write property="countyname"  name="visitprocessinfo"  />&nbsp;
            </td>
           	</tr>  
			<!-- --------------------------Row No: 9-------------------------------------- -->					
			<tr>
            
					<td class="need"><%=label.getLabelName("L_Activity")+ label.getLabelName("L_ActivityParter")+ label.getLabelName("L_Colon")%></td>
					<%
					if(visitprocessinfo.get("activitymanageid")!=null){
					%>
					<td>
					    <a onclick="javascript:popwindowuserinfo();">
						<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
	                </td>
	                <%}else{ %>
					<td>
					    <a onclick="alert('<%= message.getMessageDesc("SAVE_INFO_FIRST") %>');">
						<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
	                </td>                
	                <%} %>           		
	         		<!-- 
	         		<td>
						<custom:hidden  name="visitprocessinfo" property="userid" />
			           	<custom:text name="visitprocessinfo" property="username" size="20" command="notnull" label="L_ActivityParter"/>
	              		<a onclick="page_popUserwindow();"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
	         		</td>
	         		 --> 


				<td class="need"  ><%=label.getLabelName("L_Activity")+label.getLabelName("L_Products")+ label.getLabelName("L_Colon")%></td>

				<%
				if(visitprocessinfo.get("activitymanageid")!=null){
				%>
				<td>
				    <a onclick="javascript:popProductWindowinfo();">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>
                <%}else{ %>
				<td>
				    <a onclick="alert('<%= message.getMessageDesc("SAVE_INFO_FIRST") %>');">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>                
                <%} %>					
				<!-- 
				<td><custom:text property="prodnames" command="notnull" label="L_Products"/>
					<a onclick="javascript:popSelectProductWindow();">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
					<custom:text property="prodids" />
				</td>
				<td><custom:text name="visitprocessinfo" property="prodname"  readonly="true" command="notnull" label="L_Products"/>
					<a onclick="javascript:popSelectProductWindow();">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
				</td>
				 -->	         		           	 
           	</tr>

<!-- --------------------------Row No: 10-------------------------------------- -->	
			<tr>
            <td class="need"  ><%= label.getLabelName("L_Mactivity")+label.getLabelName("L_Invitation")+label.getLabelName("L_org")+ label.getLabelName("L_Colon") %></td>
				<%
				if(visitprocessinfo.get("activitymanageid")!=null){
				%>
				<td>
				    <a onclick="javascript:popwindoworginfo();">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>
                <%}else{ %>
				<td>
				    <a onclick="alert('<%= message.getMessageDesc("SAVE_INFO_FIRST") %>');">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>                
                <%} %>            
            <!-- 
            <td>
                	<custom:text name="visitprocessinfo" property="shortorgname" command="notnull" label="L_org" />
                    <a onclick="popbuyerorg()"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
                    <custom:hidden name="visitprocessinfo" property="shortorgid" />
                    <custom:hidden name="visitprocessinfo" property="shortorgcode" />
            </td>
             -->
             
            <td class="need"  ><%= label.getLabelName("L_Mactivity")+label.getLabelName("L_Invitation")+label.getLabelName("L_Customer")+ label.getLabelName("L_Colon") %></td>
				<%
				if(visitprocessinfo.get("activitymanageid")!=null){
				%>
				<td>
				    <a onclick="javascript:popwindowdoctorinfo();">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>
                <%}else{ %>
				<td>
				    <a onclick="alert('<%= message.getMessageDesc("SAVE_INFO_FIRST") %>');">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>                
                <%} %>   
            <!-- 
            <td>
                	<custom:text name="visitprocessinfo" property="doctorname" command="notnull" label="L_Customer"/>
                    <a onclick="popdoctor()"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
                    <custom:hidden name="visitprocessinfo" property="doctorid"  />
            </td>            
             -->
			</tr>  
			<tr>
            <td class="need"  ><%= label.getLabelName("L_MeetingTime")+ label.getLabelName("L_Colon") %></td>
            <%if(visitprocessinfo.get("activitymanageid")!=null){%>
			<td colspan="3"><a onclick="javascript:popwindowmeetinfo();"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /></a></td>
            <%}else{ %>
			<td colspan="3"><a onclick="alert('<%= message.getMessageDesc("SAVE_INFO_FIRST") %>');"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a></td>                
            <%} %>   
          </tr>                 	            	          						
			<!-- --------------------------Row No: 11-------------------------------------- -->

            <!-- 
			<tr>
				<td  class="td-text"><%= label.getLabelName("L_ Account_CustomerNumber") + label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:write property="accountcustomernumber"   />&nbsp;
	               
				<td  class="td-text"  ><%= label.getLabelName("L_ develop_CustomerNumber")+ label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:write property="developcustomernumber"    name="visitprocessinfo"  />&nbsp;
	            </td>	            				
			</tr>
			
			<tr>
				<td  class="td-text"><%= label.getLabelName("L_ Commercialsalestarget") + label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:write property="commercialsalestarget"   name="visitprocessinfo"  />&nbsp;
	              
	            </td>
				<td  class="td-text"  ><%= label.getLabelName("L_ Netsalestarget")+ label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:write property="netsalestarget"  dataType="date"  name="visitprocessinfo"  />&nbsp;
	            </td>	            				
			</tr>
			
			<tr>
				<td  class="td-text"><%= label.getLabelName("L_ Commercialpurchasetarget") + label.getLabelName("L_Colon") %></td>
	            <td colspan="3">
	               <custom:write property="commercialpurchasetarget"   name="visitprocessinfo"  />&nbsp;
	              
            				
			</tr>
			 -->
			<tr>
				<td class="td-text"><%=label.getLabelName("L_Instance") + label.getLabelName("L_Colon")%></td>
				<td colspan="3">
					<custom:write name="visitprocessinfo" property="comments" />&nbsp;
				</td>
			</tr>

									
<%}else{ %>
		<%if(visitprocessinfo.get("activitymanageid")==null){ %>


<!-- --------------------------Row No: 1-------------------------------------- -->
			<tr>
				<td class="need"><%=label.getLabelName("L_Activity")+label.getLabelName("L_Code") + label.getLabelName("L_Colon")%></td>
				<td>
					<custom:write name="visitprocessinfo" property="activitymanagecode"/>&nbsp;
				</td>
				<td class="need"><%=label.getLabelName("L_Activity")+label.getLabelName("L_ItemName1") + label.getLabelName("L_Colon")%></td>
				<td>
					<custom:text name="visitprocessinfo" property="activitymanagename" command="notnull" label="L_ItemName1"/>
				</td>
			</tr>
			
			<!-- 重点项目 活动种类 -->
			<tr>
				<td class="need"><%=label.getLabelName("L_majorproject") + label.getLabelName("L_Colon")%></td>
				<td>
					<custom:selectdic property="majorproject" dictType="MajorProject" name="visitprocessinfo"    label="L_majorproject"  command="notnull"  />
				</td>
				<td class="need"><%=label.getLabelName("L_Activity") +label.getLabelName("L_Kind")+ label.getLabelName("L_Colon")%></td>
				<td>
					<custom:selectdic property="activitytype" dictType="ActivityType" name="visitprocessinfo"   label="L_Activitytype"  command="notnull"  />
				</td>
			</tr>
			
			<!-- --------------------------Row No: 2-------------------------------------- -->
			<tr>
				<td class="need"><%=label.getLabelName("L_Activity")+label.getLabelName("L_Way")+ label.getLabelName("L_Colon")%></td>
				<td><custom:select name="visitprocessinfo" property="activityconfigid" optionsName="configs" command="notnull" 
				label="L_AgreementType" optionValueKey="activityconfigid" optionInnerTextKey="activityconfigname"  defaultValue="--------------" defaultValueCost=""/> 
				</td>
				
	            <td class="need"><%= label.getLabelName("L_Status") + label.getLabelName("L_Colon") %></td>
	          	<td>
	          	<custom:write name="visitprocessinfo" property="statusname" />
	          	<custom:hidden  name="visitprocessinfo" property="status" />	
	           	   	</td>    		
         		<!-- 
         		<td>
					<custom:hidden  name="visitprocessinfo" property="userid" />
		           	<custom:text name="visitprocessinfo" property="username" size="20" command="notnull" label="L_ActivityParter"/>
              		<a onclick="page_popUserwindow();"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
         		</td>
         		 -->
			</tr>			
			<!-- --------------------------Row No: 3-------------------------------------- -->
			

			
			<tr>
									

				<td  class="need"><%= label.getLabelName("L_ActivityReadyBeginDate")+ label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:text property="readystartdate"  dataType="date"  module="IMG" size="15" name="visitprocessinfo" command="notnull" label="L_ActivityReadyBeginDate"/>
	             <a onclick="javascript:c.show(this,'frm.readystartdate','yyyy-MM-dd');"><custom:button type="3" label="L_Asterisk" imgsrc="Time.gif" border="0"/></a>
	            </td>
				<td  class="need"  ><%= label.getLabelName("L_ActivityBeginDate")+ label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:text property="startdate"  dataType="date"  module="IMG" size="15" name="visitprocessinfo" command="notnull" label="L_ActivityBeginDate"/>
	             <a onclick="javascript:c.show(this,'frm.startdate','yyyy-MM-dd');"><custom:button type="3" label="L_Asterisk" imgsrc="Time.gif" border="0"/></a>
	            </td>	            				
			</tr>
			<!-- --------------------------Row No: 4-------------------------------------- -->
			
			<tr>

	            <td  class="need"  ><%= label.getLabelName("L_ActivityEndDate")+ label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:text property="enddate"  dataType="date"  module="IMG" size="15" name="visitprocessinfo" command="notnull" label="L_ActivityEndDate"/>
	             <a onclick="javascript:c.show(this,'frm.enddate','yyyy-MM-dd');"><custom:button type="3" label="L_Asterisk" imgsrc="Time.gif" border="0"/></a>
	            </td>
				<td  class="need"><%= label.getLabelName("L_ActivityEffectEndDate")+ label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:text property="influencedate"  dataType="date"  module="IMG" size="15" name="visitprocessinfo" command="notnull" label="L_ActivityEffectEndDate"/>
	             <a onclick="javascript:c.show(this,'frm.influencedate','yyyy-MM-dd');"><custom:button type="3" label="L_Asterisk" imgsrc="Time.gif" border="0"/></a>
	            </td>	            				
			</tr>
			<!-- --------------------------Row No: 5-------------------------------------- -->
			
			<tr>
				<td  class="need"><%= label.getLabelName("L_Maker") + label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:write property="makername"   name="visitprocessinfo" nbsp="true"/>
	               <custom:write property="employeename"   name="visitprocessinfo" nbsp="true"/>
	               <custom:hidden property="userid1"   name="visitprocessinfo" />
	            </td>
				<td  class="need"  ><%= label.getLabelName("L_CreateTime")+ label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:write property="createdate"  dataType="date"  name="visitprocessinfo" nbsp="true"/>
	            </td>	            				
			</tr>
			<!-- --------------------------Row No: 6-------------------------------------- -->
			
			<tr>			
			<td class="need"><%= label.getLabelName("L_Province") + label.getLabelName("L_Colon") %></td>
			<td>
				   <custom:text property="regioncode" name="visitprocessinfo"  size="10" readonly="true" command="notnull" label="L_Province"/>
	              <a onclick="javascript:page_selectProvince();"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
	              <custom:text property="regionname" name="visitprocessinfo" readonly="true" size="20"/>
	              <custom:hidden property="regionid" name="visitprocessinfo" />
			</td>		
          	<td class="need"><%= label.getLabelName("L_City") + label.getLabelName("L_Colon") %></td>
          	<td>
            	<custom:text property="citycode" name="visitprocessinfo"  size="10" readonly="true" command="notnull" label="L_City"/>
            	<a onclick="javascript:page_selectCity('city',1);"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
            	<custom:text property="cityname" name="visitprocessinfo" readonly="true" size="20"/>
            	<custom:hidden property="cityid" name="visitprocessinfo" />
            </td>
			</tr>
			<!-- --------------------------Row No: 7-------------------------------------- -->			
						
			<tr>
            <td class="need"><%= label.getLabelName("L_YLCounty") + label.getLabelName("L_Colon") %></td>
            <td colspan="3">
              	<custom:text property="countycode"  name="visitprocessinfo" size="10" readonly="true" command="notnull" label="L_YLCounty"/>
              	<a onclick="javascript:page_selectCity('county',2);"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
              	<custom:text property="countyname" name="visitprocessinfo" readonly="true" size="20"/>
              	<custom:hidden property="countyid" name="visitprocessinfo" />
            </td>

           	</tr>
           	<!-- --------------------------Row No: 9-------------------------------------- -->  
					
			<tr>
			<td class="need"><%=label.getLabelName("L_Activity")+ label.getLabelName("L_ActivityParter")+ label.getLabelName("L_Colon")%></td>
				<%
				if(visitprocessinfo.get("activitymanageid")!=null){
				%>
				<td>
				    <a onclick="javascript:popwindowuser();">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>
                <%}else{ %>
				<td>
				    <a onclick="alert('<%= message.getMessageDesc("SAVE_INFO_FIRST") %>');">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>                
                <%} %>            	
           	<!-- 
				<td class="need"><%=label.getLabelName("L_Prodname")+ label.getLabelName("L_Colon")%></td>
				<td><custom:text name="visitprocessinfo" property="prodname"  readonly="true"/>
					<a onclick="javascript:popSelectProductWindow();">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
				</td>           	
           	 -->
				<td class="need"  ><%=label.getLabelName("L_Activity")+label.getLabelName("L_Products")+ label.getLabelName("L_Colon")%></td>

				<%
				if(visitprocessinfo.get("activitymanageid")!=null){
				%>
				<td>
				    <a onclick="javascript:popProductWindow();">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>
                <%}else{ %>
				<td>
				    <a onclick="alert('<%= message.getMessageDesc("SAVE_INFO_FIRST") %>');">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>                
                <%} %>
				<!-- 
				<td><custom:text property="prodnames" command="notnull" label="L_Products"/>
					<a onclick="javascript:popSelectProductWindow();">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
					<custom:text property="prodids" />
				</td>
				<td><custom:text name="visitprocessinfo" property="prodname"  readonly="true" command="notnull" label="L_Products"/>
					<a onclick="javascript:popSelectProductWindow();">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
				</td>
				 -->                           	 
           	</tr>

			<!-- --------------------------Row No: 10-------------------------------------- -->	
			<tr>
            <td class="need"  ><%= label.getLabelName("L_Mactivity")+label.getLabelName("L_Invitation")+label.getLabelName("L_org")+ label.getLabelName("L_Colon") %></td>
				<%
				if(visitprocessinfo.get("activitymanageid")!=null){
				%>
				<td>
				    <a onclick="javascript:popwindoworg();">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>
                <%}else{ %>
				<td>
				    <a onclick="alert('<%= message.getMessageDesc("SAVE_INFO_FIRST") %>');">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>                
                <%} %>            
            <!-- 
            <td>
                	<custom:text name="visitprocessinfo" property="shortorgname" command="notnull" label="L_org" />
                    <a onclick="popbuyerorg()"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
                    <custom:hidden name="visitprocessinfo" property="shortorgid" />
                    <custom:hidden name="visitprocessinfo" property="shortorgcode" />
            </td>
             -->
            <td class="need"  ><%= label.getLabelName("L_Mactivity")+label.getLabelName("L_Invitation")+label.getLabelName("L_Customer")+ label.getLabelName("L_Colon") %></td>
				<%
				if(visitprocessinfo.get("activitymanageid")!=null){
				%>
				<td>
				    <a onclick="javascript:popwindowdoctor();">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>
                <%}else{ %>
				<td>
				    <a onclick="alert('<%= message.getMessageDesc("SAVE_INFO_FIRST") %>');">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>                
                <%} %>  
            <!-- 
            <td>
                	<custom:text name="visitprocessinfo" property="doctorname" command="notnull" label="L_Customer"/>
                    <a onclick="popdoctor()"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
                    <custom:hidden name="visitprocessinfo" property="doctorid"  />
            </td>            
             -->             

			</tr>
            <tr>
            <td class="need"  ><%= label.getLabelName("L_MeetingTime")+ label.getLabelName("L_Colon") %></td>
            <%if(visitprocessinfo.get("activitymanageid")!=null){%>
			<td colspan="3"><a onclick="javascript:popwindowmeet();"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /></a></td>
            <%}else{ %>
			<td colspan="3"><a onclick="alert('<%= message.getMessageDesc("SAVE_INFO_FIRST") %>');"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a></td>                
            <%} %>   
          </tr>        
            <!-- 
			<tr>
				<td  class="td-text"><%= label.getLabelName("L_ Account_CustomerNumber") + label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:text property="accountcustomernumber"   name="visitprocessinfo"  dataType="integer" label="L_ Account_CustomerNumber"/>
	               
				<td  class="td-text"  ><%= label.getLabelName("L_ develop_CustomerNumber")+ label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:text property="developcustomernumber"  dataType="integer"  name="visitprocessinfo"  label="L_ develop_CustomerNumber"/>
	            </td>	            				
			</tr>
			
			<tr>
				<td  class="td-text"><%= label.getLabelName("L_ Commercialsalestarget") + label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:text property="commercialsalestarget"   name="visitprocessinfo"  dataType="integer" label="L_ Commercialsalestarget"/>
	              
	            </td>
				<td  class="td-text"  ><%= label.getLabelName("L_ Netsalestarget")+ label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:text property="netsalestarget"  dataType="date"  name="visitprocessinfo"  dataType="integer" label="L_ Netsalestarget"/>
	            </td>	            				
			</tr>
			
			<tr>
				<td  class="td-text"><%= label.getLabelName("L_ Commercialpurchasetarget") + label.getLabelName("L_Colon") %></td>
	            <td colspan="3">
	               <custom:text property="commercialpurchasetarget"   name="visitprocessinfo"  dataType="integer" label="L_ Commercialpurchasetarget"/>
	              
            				
			</tr>
			 -->			           	            	          						
			<!-- --------------------------Row No: 11-------------------------------------- -->

			<tr>
				<td class="td-text"><%=label.getLabelName("L_Instance") + label.getLabelName("L_Colon")%></td>
				<td colspan="3">
					<custom:textarea name="visitprocessinfo" property="comments" rows="2" cols="100"/>
				</td>
			</tr>
<%} %>
<%if(visitprocessinfo.get("activitymanageid")!=null){ %>


<!-- --------------------------Row No: 1-------------------------------------- -->
			<tr>
				<td class="need"><%=label.getLabelName("L_Activity")+label.getLabelName("L_Code") + label.getLabelName("L_Colon")%></td>
				<td>
					<custom:write name="visitprocessinfo" property="activitymanagecode"/>&nbsp;
				</td>
				<td class="need"><%=label.getLabelName("L_Activity")+label.getLabelName("L_ItemName1") + label.getLabelName("L_Colon")%></td>
				<td>
					<custom:text name="visitprocessinfo" property="activitymanagename" command="notnull" label="L_ItemName1"/>
				</td>
			</tr>
			
			
			
			<!-- 重点项目 活动种类 -->
			<tr>
				<td class="need"><%=label.getLabelName("L_majorproject") + label.getLabelName("L_Colon")%></td>
				<td>
					<custom:selectdic property="majorproject" dictType="MajorProject" name="visitprocessinfo"    label="L_majorproject"  command="notnull"  />
				</td>
				<td class="need"><%=label.getLabelName("L_Activity") +label.getLabelName("L_Kind")+ label.getLabelName("L_Colon")%></td>
				<td>
					<custom:selectdic property="activitytype" dictType="ActivityType" name="visitprocessinfo"   label="L_Activitytype"  command="notnull"  />
				</td>
			</tr>
			
			<!-- --------------------------Row No: 2-------------------------------------- -->
			<tr>
				<td class="need"><%=label.getLabelName("L_Activity")+label.getLabelName("L_Way")+ label.getLabelName("L_Colon")%></td>
				<td><custom:select name="visitprocessinfo" property="activityconfigid" optionsName="configs" command="notnull" 
				label="L_AgreementType" optionValueKey="activityconfigid" optionInnerTextKey="activityconfigname"  defaultValue="--------------" defaultValueCost=""/> 
				</td>
				
	            <td class="need"><%= label.getLabelName("L_Status") + label.getLabelName("L_Colon") %></td>
	          	
	          	<td>
	          	<custom:write name="visitprocessinfo" property="statusname" />
	          	<custom:hidden  name="visitprocessinfo" property="status" />	
	           	   	</td>
	                    	
	           	
         		<!-- 
         		<td>
					<custom:hidden  name="visitprocessinfo" property="userid" />
		           	<custom:text name="visitprocessinfo" property="username" size="20" command="notnull" label="L_ActivityParter"/>
              		<a onclick="page_popUserwindow();"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
         		</td>
         		 -->
			</tr>			
			<!-- --------------------------Row No: 3-------------------------------------- -->
			

			
			<tr>
									

				<td  class="need"><%= label.getLabelName("L_ActivityReadyBeginDate")+ label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:text property="readystartdate"  dataType="date"  module="IMG" size="15" name="visitprocessinfo" command="notnull" label="L_ActivityReadyBeginDate"/>
	             <a onclick="javascript:c.show(this,'frm.readystartdate','yyyy-MM-dd');"><custom:button type="3" label="L_Asterisk" imgsrc="Time.gif" border="0"/></a>
	            </td>
				<td  class="need"  ><%= label.getLabelName("L_ActivityBeginDate")+ label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:text property="startdate"  dataType="date"  module="IMG" size="15" name="visitprocessinfo" command="notnull" label="L_ActivityBeginDate"/>
	             <a onclick="javascript:c.show(this,'frm.startdate','yyyy-MM-dd');"><custom:button type="3" label="L_Asterisk" imgsrc="Time.gif" border="0"/></a>
	            </td>	            				
			</tr>
			<!-- --------------------------Row No: 4-------------------------------------- -->
			
			<tr>

	            <td  class="need"  ><%= label.getLabelName("L_ActivityEndDate")+ label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:text property="enddate"  dataType="date"  module="IMG" size="15" name="visitprocessinfo" command="notnull" label="L_ActivityEndDate"/>
	             <a onclick="javascript:c.show(this,'frm.enddate','yyyy-MM-dd');"><custom:button type="3" label="L_Asterisk" imgsrc="Time.gif" border="0"/></a>
	            </td>
				<td  class="need"><%= label.getLabelName("L_ActivityEffectEndDate")+ label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:text property="influencedate"  dataType="date"  module="IMG" size="15" name="visitprocessinfo" command="notnull" label="L_ActivityEffectEndDate"/>
	             <a onclick="javascript:c.show(this,'frm.influencedate','yyyy-MM-dd');"><custom:button type="3" label="L_Asterisk" imgsrc="Time.gif" border="0"/></a>
	            </td>	            				
			</tr>
			<!-- --------------------------Row No: 5-------------------------------------- -->

			<tr>
				<td  class="need"><%= label.getLabelName("L_Maker") + label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:write property="makername"   name="visitprocessinfo" nbsp="true"/>
	               <custom:write property="employeename"   name="visitprocessinfo" nbsp="true"/>
	               <custom:hidden property="userid1"   name="visitprocessinfo" />
	            </td>
				<td  class="need"  ><%= label.getLabelName("L_CreateTime")+ label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:write property="createdate"  dataType="date"  name="visitprocessinfo" nbsp="true"/>
	            </td>	            				
			</tr>
			<!-- --------------------------Row No: 6-------------------------------------- -->			

			<tr>			
			<td class="need"><%= label.getLabelName("L_Province") + label.getLabelName("L_Colon") %></td>
			<td>
				   <custom:text property="regioncode" name="visitprocessinfo"  size="10" readonly="true" command="notnull" label="L_Province"/>
	              <a onclick="javascript:page_selectProvince();"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
	              <custom:text property="regionname" name="visitprocessinfo" readonly="true" size="20"/>
	              <custom:hidden property="regionid" name="visitprocessinfo" />
			</td>		
          	<td class="need"><%= label.getLabelName("L_City") + label.getLabelName("L_Colon") %></td>
          	<td>
            	<custom:text property="citycode" name="visitprocessinfo"  size="10" readonly="true" command="notnull" label="L_City"/>
            	<a onclick="javascript:page_selectCity('city',1);"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
            	<custom:text property="cityname" name="visitprocessinfo" readonly="true" size="20"/>
            	<custom:hidden property="cityid" name="visitprocessinfo" />
            </td>
			</tr>
			<!-- --------------------------Row No: 7-------------------------------------- -->						
			
			<tr>
            <td class="need"><%= label.getLabelName("L_YLCounty") + label.getLabelName("L_Colon") %></td>
            <td colspan="3">
              	<custom:text property="countycode"  name="visitprocessinfo" size="10" readonly="true" command="notnull" label="L_YLCounty"/>
              	<a onclick="javascript:page_selectCity('county',2);"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
              	<custom:text property="countyname" name="visitprocessinfo" readonly="true" size="20"/>
              	<custom:hidden property="countyid" name="visitprocessinfo" />
            </td>

           	</tr> 
			<!-- --------------------------Row No: 9-------------------------------------- -->           	 
						
			<tr>
			<td class="need"><%=label.getLabelName("L_Activity")+ label.getLabelName("L_ActivityParter")+ label.getLabelName("L_Colon")%></td>
				<%
				if(visitprocessinfo.get("activitymanageid")!=null){
				%>
				<td>
				    <a onclick="javascript:popwindowuser();">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>
                <%}else{ %>
				<td>
				    <a onclick="alert('<%= message.getMessageDesc("SAVE_INFO_FIRST") %>');">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>                
                <%} %>            	
           	<!-- 
				<td class="need"><%=label.getLabelName("L_Prodname")+ label.getLabelName("L_Colon")%></td>
				<td><custom:text name="visitprocessinfo" property="prodname"  readonly="true"/>
					<a onclick="javascript:popSelectProductWindow();">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
				</td>           	
           	 -->
				<td class="need"  ><%=label.getLabelName("L_Activity")+label.getLabelName("L_Products")+ label.getLabelName("L_Colon")%></td>

				<%
				if(visitprocessinfo.get("activitymanageid")!=null){
				%>
				<td>
				    <a onclick="javascript:popProductWindow();">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>
                <%}else{ %>
				<td>
				    <a onclick="alert('<%= message.getMessageDesc("SAVE_INFO_FIRST") %>');">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>                
                <%} %>
				<!-- 
				<td><custom:text property="prodnames" command="notnull" label="L_Products"/>
					<a onclick="javascript:popSelectProductWindow();">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
					<custom:text property="prodids" />
				</td>
				<td><custom:text name="visitprocessinfo" property="prodname"  readonly="true" command="notnull" label="L_Products"/>
					<a onclick="javascript:popSelectProductWindow();">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
				</td>
				 -->                           	 
           	</tr>

			<!-- --------------------------Row No: 10-------------------------------------- -->
			<tr>
            <td class="need"  ><%= label.getLabelName("L_Mactivity")+label.getLabelName("L_Invitation")+label.getLabelName("L_org")+ label.getLabelName("L_Colon") %></td>
				<%
				if(visitprocessinfo.get("activitymanageid")!=null){
				%>
				<td>
				    <a onclick="javascript:popwindoworg();">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>
                <%}else{ %>
				<td>
				    <a onclick="alert('<%= message.getMessageDesc("SAVE_INFO_FIRST") %>');">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>                
                <%} %>            
            <!-- 
            <td>
                	<custom:text name="visitprocessinfo" property="shortorgname" command="notnull" label="L_org" />
                    <a onclick="popbuyerorg()"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
                    <custom:hidden name="visitprocessinfo" property="shortorgid" />
                    <custom:hidden name="visitprocessinfo" property="shortorgcode" />
            </td>
             -->
            <td class="need"  ><%= label.getLabelName("L_Mactivity")+label.getLabelName("L_Invitation")+label.getLabelName("L_Customer")+ label.getLabelName("L_Colon") %></td>
				<%
				if(visitprocessinfo.get("activitymanageid")!=null){
				%>
				<td>
				    <a onclick="javascript:popwindowdoctor();">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>
                <%}else{ %>
				<td>
				    <a onclick="alert('<%= message.getMessageDesc("SAVE_INFO_FIRST") %>');">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>                
                <%} %>   
            <!-- 
            <td>
                	<custom:text name="visitprocessinfo" property="doctorname" command="notnull" label="L_Customer"/>
                    <a onclick="popdoctor()"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
                    <custom:hidden name="visitprocessinfo" property="doctorid"  />
            </td>            
             -->
			</tr>     
			<tr>
            <td class="need"  ><%= label.getLabelName("L_MeetingTime")+ label.getLabelName("L_Colon") %></td>
            <%if(visitprocessinfo.get("activitymanageid")!=null){%>
			<td colspan="3"><a onclick="javascript:popwindowmeet();"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /></a></td>
            <%}else{ %>
			<td colspan="3"><a onclick="alert('<%= message.getMessageDesc("SAVE_INFO_FIRST") %>');"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a></td>                
            <%} %>   
          </tr>              	            	          						
			<!-- --------------------------Row No: 11-------------------------------------- -->
			
			<!-- 
			<tr>
				<td  class="td-text"><%= label.getLabelName("L_ Account_CustomerNumber") + label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:text property="accountcustomernumber"   name="visitprocessinfo"  dataType="integer" label="L_ Account_CustomerNumber"/>
	               
				<td  class="td-text"  ><%= label.getLabelName("L_ develop_CustomerNumber")+ label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:text property="developcustomernumber"  dataType="integer"  name="visitprocessinfo"  label="L_ develop_CustomerNumber"/>
	            </td>	            				
			</tr>
			
			<tr>
				<td  class="td-text"><%= label.getLabelName("L_ Commercialsalestarget") + label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:text property="commercialsalestarget"   name="visitprocessinfo"  dataType="integer" label="L_ Commercialsalestarget"/>
	              
	            </td>
				<td  class="td-text"  ><%= label.getLabelName("L_ Netsalestarget")+ label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:text property="netsalestarget"  dataType="date"  name="visitprocessinfo"  dataType="integer" label="L_ Netsalestarget"/>
	            </td>	            				
			</tr>
			
			<tr>
				<td  class="td-text"><%= label.getLabelName("L_ Commercialpurchasetarget") + label.getLabelName("L_Colon") %></td>
	            <td colspan="3">
	               <custom:text property="commercialpurchasetarget"   name="visitprocessinfo"  dataType="integer" label="L_ Commercialpurchasetarget"/>
	              
            				
			</tr>
			 -->
			<tr>
				<td class="td-text"><%=label.getLabelName("L_Instance") + label.getLabelName("L_Colon")%></td>
				<td colspan="3">
					<custom:textarea name="visitprocessinfo" property="comments" rows="2" cols="100"/>
				</td>
			</tr>
<%} %>
<%} %>
		</table>
		</td>
	</tr>
	<!-- --------------------------Row No: 12-------------------------------------- -->
	<tr>
		<td class="summary_top"></td>
	</tr>
	<tr>
		<td height="49" class="td_center">
		 <custom:hidden property="userid"  name="userinfo" scope="session"/>
          <%if((visitprocessinfo.get("status")!=null && ((Integer)visitprocessinfo.get("status")).intValue() == 10)
        	&& (visitprocessinfo.get("userid1")!=null && ((Integer)visitprocessinfo.get("userid1")).intValue() == ((Integer)userinfo.get("userid")).intValue())	  
          ){%>
          <a onclick="page_submit()"><custom:button type="1" label="L_Submit1" imgsrc="back.gif" border="0" style="width:60" /></a>
          <%}%>
          <!-- 
          <%if(visitprocessinfo.get("status")!=null && ((Integer)visitprocessinfo.get("status")).intValue() == 20 && needrspinfo.size()>0){%>
          <a onclick="page_donesub('agree')"><custom:button type="1" label="L_Agree" imgsrc="new.gif" border="0" style="width:60"/></a>
          <a onclick="page_donesub('disagree')"><custom:button type="1" label="L_NotAgree" imgsrc="edit.gif" border="0" style="width:60"/></a>
          <a onclick="page_donesub('deny')"><custom:button type="1" label="L_Deny" imgsrc="delete.gif" border="0" style="width:60"/></a> 
          <a onclick="javascript:page_approval()" ><custom:button type="1" label="L_Check" imgsrc="save.gif" border="0" style="width:60"   /></a>
          <a onclick="javascript:page_approvalInfo()" ><custom:button type="1" label="L_Approve" imgsrc="save.gif" border="0" style="width:60"   /></a>
          <a onclick="page_done()"><custom:button type="1" label="L_Save" imgsrc="finish.gif" border="0" style="width:60" /></a>
	      <a onclick="page_return()"><custom:button type="1" label="L_Back" border="0"  imgsrc="finish.gif" style="width:60" /></a>
	      
	      
	      
           <%}else{ %>
          <%}%>
           -->	   
           <!-- 
           <a onclick="javascript:page_approvalInfo()" ><custom:button type="1" label="L_Approve" imgsrc="save.gif" border="0" style="width:60"   /></a>
            -->
			<a onclick="page_done()"><custom:button type="1" label="L_Save" imgsrc="finish.gif" border="0" style="width:60" /></a>
			<a onclick="page_return()"><custom:button type="1" label="L_Back" border="0"  imgsrc="finish.gif" style="width:60" /></a>
		</td>
	</tr>

</table>

</body>
</html>



